#include "IndexBuffer.h"

NS_B2D_BEGIN

IndexBuffer::IndexBuffer(void)
	: mIndexSize(IndexSize::INT16_INDEX)
	, mIndexCount(0)
{

}

IndexBuffer::~IndexBuffer(void)
{

}

void IndexBuffer::resize(size_t indexCount, IndexSize indexSize, BufferUsage usage)
{
	mIndexCount = indexCount;
	mIndexSize = indexSize;
	mBufferUsage = usage;
	mBufferSize = mIndexCount * static_cast<size_t>(mIndexSize);
	resizeImpl();
}

NS_B2D_END